

(defun my-shell-mode-hook ()

  (defun sh-find-files ()
    "find file in shell-mode"
    (interactive)
    (let* ((filename (read-string "File name: "))
           (cmdline (concat "find -name \"" filename "\"")))
      (insert-string cmdline)
      (comint-send-input)))
  (define-key shell-mode-map (kbd "C-c f") 'sh-find-files)
 
  ;; open cscope minor mode in shell mode
  (cscope-minor-mode)
  )

(add-hook 'sh-set-shell-hook 'flymake-shell-load)
(add-hook 'shell-mode-hook 'my-shell-mode-hook)

(add-to-list 'auto-mode-alist '("Kconfig" . sh-mode))

(provide 'init-sh)
